package sch.frog.creational.prototype;

import sch.frog.creational.prototype.entity.ObjectA;
import sch.frog.creational.prototype.entity.ObjectB;

public class PrototypeDemo {

    public static void main(String[] args){
        ObjectA a = new ObjectA();
        a.setA(1);
        a.setB(2);
        ObjectA b = a.clone();
        System.out.println(a.clone());
        System.out.println(a == b);
        System.out.println(a.equals(b));

        ObjectB bb = new ObjectB();
        ObjectB c = bb.clone();
        System.out.println(c);
    }

}
